#!/usr/bin/env bash 
 
echo "start install jenkins" 

# 下载依赖
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
# 导入秘钥
rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

echo "install jenkins..." 
yum install -y jenkins 

echo "启动 jenkins..."
systemctl start jenkins

cat /var/lib/jenkins/secrets/initialAdminPassword  
echo "admin初始密码："
